﻿
using Open.Domain;
using Open.Domain.Abstractions;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Open.Product.Domain.Model
{

    [Table("baseproductstandardbarcodes")]
    public class ProductStandardBarCode : AggregateRoot<ProductStandardBarCode, string>, IMustHaveTenant
    {

        /// <summary>
        /// 初始化应用程序
        /// </summary>
        /// <param name="id">应用程序标识</param>
        public ProductStandardBarCode(string id) : base(id)
        {

        }

        /// <summary>
        /// 初始化应用程序
        /// </summary>
        public ProductStandardBarCode() : this(string.Empty)
        {

        }

        [Key]
        public long Id { get;  set; }

        /// <summary>
        /// 商品规格主键
        /// </summary>

        public long BaseProductStandardId { get; set; }

        /// <summary>
        /// 条形码
        /// </summary>
        public string BarCode { get; set; }

        #region 公共字段

        /// <summary>
        /// 租户ID
        /// </summary>
        public int TenantId { get; set; }

        #endregion
    }
}